/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * 说明：
 * Entity Name 销售退货
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TOrderReturn")
public class TOrderReturn implements Serializable{

	private static final long serialVersionUID = 1L;

	private String ReturnID;//退货编号CHAR(15) PK
	
	private String Reason;//退货原因VARCHAR(512)
	
	private String Operator;//操作人CHAR(15)
	
	private Date HappenTime;//操作时间DATETIME
	
	private String RelOrderID;//原相关订单CHAR(15)
	
	private TUser TUser;//用户
	
	private String StoreName;//退货仓库名称  另外添加，进入数据库  Jason  因为查询详细的时候，需要查询仓库名称

	private Date startTime;//用于查询，不进入数据库

	private Date endTime;//用于查询，不进入数据库 jason
	
	private TSupplier supplier;//供应商id
	
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="SupplierID")
	public TSupplier getSupplier() {
		return supplier;
	}
	public void setSupplier(TSupplier supplier) {
		this.supplier = supplier;
	}

	@Id
	@Column(name = "ReturnID", length=15)
	public String getReturnID() {
		return ReturnID;
	}

	public void setReturnID(String returnID) {
		ReturnID = returnID;
	}


	@Column(name = "Reason", length=512)
	public String getReason() {
		return Reason;
	}

	public void setReason(String reason) {
		Reason = reason;
	}

	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}

	public void setOperator(String operator) {
		Operator = operator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}

	@Column(name = "RelOrderID", length=15)
	public String getRelOrderID() {
		return RelOrderID;
	}

	public void setRelOrderID(String relOrderID) {
		RelOrderID = relOrderID;
	}

	@ManyToOne
	@JoinColumn(name="UserID")
	public TUser getTUser() {
		return TUser;
	}

	public void setTUser(TUser tUser) {
		TUser = tUser;
	}
	
	@Column(name = "StoreName", length=128)
	public String getStoreName() {
		return StoreName;
	}

	public void setStoreName(String storeName) {
		StoreName = storeName;
	}
	@Transient
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@Transient
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
}
